<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$ziliao.nickname}的空间_散文吧</title>
    <link href="__ROOT__/shiwen/pc/xin/css/newspace.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="__ROOT__/static/plugs/jquery/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__ROOT__/shiwen/pc/xin/css/sweetalert.css">
    <link type="image/x-icon" href="__ROOT__/shiwen/pc/xin/image/okshiwen.ico" rel="icon">
<style type="text/css">
    .pagination {
        display: flex;
        justify-content: center;
        margin: 20px 0;
        font-family: 'Arial', sans-serif;
    }

    .pagination ul {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    }

    .pagination li {
        margin: 0;
    }

    .pagination li a,
    .pagination li span {
        display: block;
        padding: 8px 16px;
        text-decoration: none;
        color: #333;
        border: 1px solid #ddd;
        background: #fff;
        transition: all 0.3s ease;
    }

    .pagination li:first-child a,
    .pagination li:first-child span {
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
    }

    .pagination li:last-child a,
    .pagination li:last-child span {
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
    }

    .pagination li a:hover {
        background: #f5f5f5;
    }

    .pagination li.active span {
        background: #428bca;
        color: white;
        border-color: #428bca;
    }

    .pagination li.disabled span {
        color: #aaa;
        background: #f5f5f5;
        cursor: not-allowed;
    }
</style>
    <script src="__ROOT__/shiwen/pc/xin/js/sweetalert.min.js"></script>
    <script>
        function follow(uid){
            $.post('/do/follow',{uid:uid},function(msg){
                alert(msg.info);
            },'json');
        }
        $(function(){
            $('.username').hover(
                function(){
                    $('.username .subnav').slideDown();
                    $(this).addClass('navhover');
                },function(){
                    $('.username .subnav').slideUp();
                    $(this).removeClass('navhover');
                }
            );
        });
    </script>
</head>
<body>
<div class="wrapper">
    <div class="topwrapper">
        <div id="top">
            <ul class="menu">
                <li class="logo"><a href="/"><img src="__ROOT__/shiwen/pc/xin/picture/xlogo.png" style="margin-top:-5px;"/></a></li>
                <li><a href="/">首页</a></li>
                <li><a href="/home.html">我的主页</a></li>
<!--                <li><a href="/article/.html" rel="nofollow" target="_blank">随便看看</a></li>-->
            <li><a href="/member_center.html" target="_blank">文章管理</a></li>
            <li><a href="/loveList.html" target="_blank">三行情诗</a></li>
            </ul>
            {empty name="author_id"}
            <ul class="login">
               <li><a href="member_center" target="_blank">发布文章</a></li>
                <li class="username">
                   <a href="#"><u>{$ziliao.nickname}<em>&nbsp;</em></u><i></i></a>
                    <div class="subnav">
                        <a href="setting" target="_blank">设置</a><br /><a href="javascript:void(0);" onclick="logout()">退出</a>
                   </div>
                </li>
            </ul>
            {/empty}
        </div>
    </div>
    <div id="header"></div>
    <div id="content">
        <div id="sidebar">
            <div class="mod useravatar">
                <a  style="width:180px; height:180px; overflow:hidden; display:block;border:none; border-radius: 90px; margin:0 auto;" >
                    <img src="{$ziliao.avatar|default='__ROOT__/shiwen/pc/xin/image/moren.jpg'}" width="180" style="min-height:180px;" alt="{$ziliao.nickname}"/>
                </a>

            </div>
            <div class="mod userinfo">
                <h1><a>{$ziliao.nickname}</a></h1><p>{$ziliao.intr}
            </div>
            <div class="mod userfans">
                <h2>访问量:<strong>{$visit_num}</strong></h2>
            </div>
            <div class="mod visitor">
                <h2>最近访客</h2>
                <ul class="avatar_list">
                    {volist name="visit" id="vo"}
                        <li><a href="javascript:void(0)" onclick="gohome({$vo.tow})" title="{$vo.nickname}" target="_blank"><img src="{$vo.avatar}" width="45" height="45" alt="{$vo.nickname}" /></a></li>
                    {/volist}
                </ul>
            </div>
        </div>
        <div id="main">
            {empty name="author_id"}
            <div class="item">
                <div class="title"><a href1="">最新动态</a></div>
                <ul>
                    {volist name="list" id="vo"}
                    <li>
                        <div class="t">
                            <font color="red">{$vo.critic}</font>
                            {if $vo.is_level == 0}
                            评论
                            {else /}
                            回复
                            {/if}
                            你的文章
                            <a href="{:url('Index/article', ['id' => $vo.pid])}" target="_blank">《{$vo.title}》</a>
                            <span class="dateline">{$vo.addtime|date='Y-m-d H:i:s'}</span>
                        </div>
                        <div class="d"><p>{$vo.content}</p></div>
                    </li>
                    {/volist}

                    {volist name="list1" id="vo"}
                    <li>
                        <div class="t">
                            <font color="green">你</font>
                            {if $vo.is_level == 0}
                            评论
                            {else /}
                            回复
                            {/if}
                            <font color="green">{$vo.nickname}</font>的文章
                            <a href="{:url('Index/article', ['id' => $vo.pid])}" target="_blank">《{$vo.title}》</a>
                            <span class="dateline">{$vo.addtime}</span>
                        </div>
                        <div class="d"><p>{$vo.content}</p></div>
                    </li>
                    {/volist}
                </ul>
                <div class="spare"></div>
            </div>
            {/empty}
            {empty name="article"}
                <div class="item">
                    <p>客官你好懒,快<a href="Member/postarticle" target="_blank">发布文字吧</a></p>
                </div>
            {else /}

                {volist name="article" id="vo"}
                    <div class="item">
                        <div class="title"><a href="/article/{$vo['id']}.html" target="_blank">{$vo.title}</a></div>

                        <div class="info"><span class="ainfo">阅读({$vo.access}) 评论({$vo.comment_num}) 推荐(0) {$vo.add_time|date='Y-m-d'}</span></div>
                    </div>
                {/volist}
            {/empty}
            <div class="pagination">{$article->render()|raw}</div>
        </div>
    </div>
    <input type="hidden" class="session" value="">
    <div id="footer">&copy;2007-2013 <a href="/" target="_blank">诗文网</a> www.okshiwen.cn
    </div>
</div>
</body>
<script>
    function logout(){
        $.ajax({
            url: "/logout.html",
            type: "POST",
            data: {},
            dataType: "json",
            success: function(msg) {
                if (msg.code == 200) {
                    swal("Good!", msg.msg, "success");
                    setTimeout(function(){
                        window.location.reload();
                    },1000);
                } else {
                    swal("OMG!", "客官,这货不肯走啊!!!", "error");
                }
            }
        });
    }

    //访问
    function gohome(uid){
        var session=$(".session").val();
        $.post("visit",{'session':session,'uid':uid},function(msg){
            if(msg.status==1){
                //swal("Good!", msg.info, "success");
                setTimeout(function(){
                    window.location.href='http://www.okshiwen.cn/index.php/Home/Member/index/uid/'+uid;
                }, 1000);
            }
            else
            {
                swal("OMG!", msg.info, "error");
            }
        });
    }
</script>
</html>